<?php
/**
 * 示例model（标注表的作用）
 * panglishan
 * 2020.08.13
 */
namespace App\Models\MainDB;

use Illuminate\Database\Eloquent\Model;

class RoomBackground extends Model{

    protected $table = 'ln_room_background';     //数据库内完整表名

    protected $primaryKey = 'id';    //主键名

    protected $fillable = [
        'id',      //主键ID
        'picture',
        'name',
        'add_time',     //创建时间
        'effect_picture',
        'sell_status',
        'is_free',
        'update_time',
    ];

    public $timestamps = false;

    public  function  room_background_products_price(){
        return $this->hasMany('App\Models\MainDB\RoomBackgroundProductsPrice','room_background_id','id');
    }
}